<?php
// require convenience functions
require_once 'convenience.php';
// require necessary simpletest files
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once 'simpletest/mock_objects.php';
// require plugin file
require_once 'kodify.php';

// create the kodify tests
class KodifyTests extends UnitTestCase {

	public function setUp() {
	
		
	
	}
	
	public function tearDown() {
	
		
	
	}
	/**
	 * <code></code> blocks should be masked properly. This means they should
	 * be changed to [code][/code] and base64 encoded.
	 */
	public function testMaskCode() {
	
		$unmasked = '<p>foo</p><code>foobar</code><span>bar</span>';
		$masked = lv_code_mask($unmasked);
		$this->assertEqual($masked, "<p>foo</p>[code]PGNvZGU+Zm9vYmFyPC9jb2RlPg==[/code]<span>bar</span>");
	
	}

}

// run tests
$test = new KodifyTests();
$test->run(new HtmlReporter());
?>